package com.baize.minespace.service.impl;

import com.baize.minespace.mapper.PostCategoriesMapper;
import com.baize.minespace.pojo.PostCategories;
import com.baize.minespace.service.PostCategoriesService;
import com.baize.minespace.utils.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 文章分类关联表 服务实现类
 * </p>
 *
 * @author baize
 * @since 2024-04-15
 * @version ${cfg.version}
 */
@Service
public class PostCategoriesServiceImpl extends ServiceImpl<PostCategoriesMapper, PostCategories> implements PostCategoriesService {
    @Override
    public Result<IPage<PostCategories>>selectPostCategoriesPage(Integer rows,Integer page,PostCategories postCategories){
        Page<PostCategories> postCategoriesPage=new Page<>(rows,page);
        IPage<PostCategories> postCategoriesIPage=baseMapper.selectPostCategoriesPage(postCategoriesPage, postCategories);
        return Result.success(postCategoriesIPage);
    }
}
